Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

Accessibility: politely Inform the the screen reader on slide change #752

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nadavkav
Copy link
Contributor

Hi Gareth,
I am getting an accessibility audit to our system and to the Essential theme.
So here is one tiny and important fix.
Which instructs the screen reader to wait until it finishes reading the current slide's content before starting to read the new slide that already switched. which, btw, I am told... is confusing to the listener and so we made the interval bigger and tried to shorten the text we put inside the sliders.

Also, as an alternative, our accessibility advisor asked us to disable the auto switching of slides.

Maybe we should put some good advise in the theme settings help? as I have no idea how system administrator with no experience using a screen reader can know about these anomalies.

Hi Gareth,
I am getting an accessibility audit to our system and to the Essential theme.
So here is one tiny and important fix.
Which instructs the screen reader to wait until it finishes reading the current slide's content before starting to read the new slide that already switched. which, btw, I am told... is confusing to the listener and so we made the interval bigger and tried to shorten the text we put inside the sliders.

Also, as an alternative, our accessibility advisor asked us to disable the auto switching of slides. 

Maybe we should put some good advise in the theme settings help? as I have no idea how system administrator with no experience using a screen reader can know about these anomalies.
@gjb2048 gjb2048 self-assigned this Sep 18, 2016
@gjb2048
Copy link
Owner

gjb2048 commented Sep 18, 2016

Thanks Nadav,

Ok, this is aria-live: https://www.w3.org/TR/wai-aria/states_and_properties#aria-live - but please provide supporting evidence that it is the correct thing to do as I don't want to make the change and then find its wrong.

Also, I don't believe in reducing functionality. I believe in automatic inclusion, thus the slider should not be disabled for all for auto-sliding or should the administrator make that sort of decision. Rather that when using a screen-reader this should be detected and the code stop the slider for that demographic. Therefore, please ask the advisor how I detect screen-readers (all of them on the market).

G

@nadavkav
Copy link
Contributor Author

Well, "off" does not seems like a good option, and "assertive" is problematic with short transition intervals (as we would probably never hear the complete text on short time periods) also, it is badly supported considering the various screenreads & OSes & browsers combinations (see: http://www.slideshare.net/maxdesign/arialive-the-good-the-bad-and-the-ugly) and "poilte" seems the polite thing to do 😄

There is no good way to detect screen readers as they do not have a "user agent" and are part of the browser (sort of extensions) as far as I searched for it on the internet. also seems like a bad habit.
and I am told by our advisor the you do not want to go there (more info: http://www.powermapper.com/tests/screen-readers/aria/)

Interesting read: kenwheeler/slick#1937 (Remove aria-live="polite" when slider is not focused)

@nadavkav
Copy link
Contributor Author

@nadavkav
Copy link
Contributor Author

Interesting, but not directly related: https://www.sitepoint.com/unbearable-accessible-slideshow/

@gjb2048
Copy link
Owner

gjb2048 commented Sep 18, 2016

Therefore only have aria-live="polite" when the carousel is focused? If so, then that pauses the slider anyway.

@nadavkav
Copy link
Contributor Author

Considering all the above links and recommendations... I think it should start "polite" as it is visible, and when not visible turned "off". is it possible?

@gjb2048
Copy link
Owner

gjb2048 commented Sep 19, 2016 via email

@nadavkav
Copy link
Contributor Author

I meant visible/seen in the viewport of the browser. (not DOM visible) as when the user scrolls without it losing the focus it is still automatically scrolling and the screen reader will politely read it.
I am looking for "If You do not see it do not read it" behaviour.

@gjb2048
Copy link
Owner

gjb2048 commented Sep 21, 2016

Ok, contradiction.

The carousel has: https://github.com/moodle/moodle/blob/MOODLE_31_STABLE/theme/bootstrapbase/amd/src/bootstrap.js#L294 which pauses the carousel when it's focused. kenwheeler/slick#1937 indicates that aria-live should not be there when not focused and there when focused. However when focused then the sliding stops, therefore its not needed then!

@gjb2048
Copy link
Owner

gjb2048 commented Sep 21, 2016

Therefore need more evidence to back this up as a good thing before I pull it, then get 'agro' and then have to remove it again.

@gjb2048
Copy link
Owner

gjb2048 commented Sep 21, 2016

In any event, the commit is therefore not the solution as need to be JS to add 'aria-live' when focused and remove it when not, if your argument holds water.

@nadavkav
Copy link
Contributor Author

Indeed. you are right. I will research this deeper and get back to you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants